    <?php
	$codm=$_POST['fcodmat'];
	$desc=$_POST['fdescripcion'];
	$precio=$_POST['fprecio'];
	$dia=$_POST['day'];
	$mes=$_POST['month'];
	$yea=$_POST['year'];
	$dia2=$_POST['day2'];
	$mes2=$_POST['month2'];
	$yea2=$_POST['year2'];
	$stock=$_POST['fstock'];
	$con= mysql_connect('localhost','root','');
	mysql_select_db('spa_medico');
	$sql=mysql_query("insert into material values('$codm','$desc','$precio','$yea-$mes-$dia','$yea2-$mes2-$dia2','$stock')");
	if(mysql_query($sql,$con))
	{
		echo "Error";
	}
	else
	{
		echo "Insumos Registrados en Stock";
	}
?>
